/*
* main.cpp
*
* This file is responsible for creating Troops & Flags game for Nintendo DS.
*
* The Troops & Flags game is implemented in the TFGame class.
* This class follows the MVC design pattern. An underlying model stores
* the state of gameplay. When an interaction (touch screen or keypad)
* is detected, the controller will (in the case of touch screen) ask 
* the view for what gameplay object was touched. The controller can
* decide what action to take for updating the model. If the controller
* has updated the model, it will tell the view to redraw. For the view
* to redraw, it will ask the model for data to visualize on the screen.
*
* The main.cpp will use the TFGame class to start the different parts
* of the game loop defined by Steven Rabin in "Introduction to Game Development" 2005, on page 272.
* 1. Game Initialization -> TFGame::Initialize() + TFGame::SplashIntro()
* 2. Main Game Loop  -> TFGame::RunGame()
* 3. Game Shutdown -> TFGame::ShutdownGame()
* 
* 
* Author: Rapid Dojo
* Date: Oct 19, 2007
*/

#include <TFGame.h> //Troops and Flags Game
#include <TFConstants.h> //Constants used for Troops and Flags Game


int main()
{
	HRESULT HR = S_OK; //for error handling

	//Create Troops & Flags game
	TFGame * myTFGame = new TFGame();

	//Init game
	HR = myTFGame->Initialize();

	//Show splash screens
	HR = myTFGame->SplashIntro();

	//Launch the playable part of the game
	HR = myTFGame->RunGame();

	//Do close down procedures
	HR = myTFGame->ShutdownGame();

	return HR;
}
